<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set autocommit mode of the connection</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.cubrid-set-autocommit" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">cubrid_set_autocommit</h1>
  <p class="verinfo">(PECL CUBRID &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">cubrid_set_autocommit</span> &mdash; <span class="dc-title">Set autocommit mode of the connection</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.cubrid-set-autocommit-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>cubrid_set_autocommit</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$conn_identifier</code></span>
   , <span class="methodparam"><span class="type">bool</span> <code class="parameter">$mode</code></span>  
   ) : <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   The <span class="function"><strong>cubrid_set_autocommit()</strong></span> function is used to set the
   CUBRID database auto-commit mode of the current database connection. 
  </p>
  <p class="para"> 
   In CUBRID PHP, auto-commit mode is disabled by default for transaction
   management. When auto-commit mode is truned from off to on, any pending work is
   automatically committed.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.cubrid-set-autocommit-parameters">
 <h3 class="title">参数</h3>
 <p class="para">
  <dl>

   
    <dt>
<code class="parameter">conn_identifier</code></dt>

    <dd>
<p class="para">Connection identifier.</p></dd>

   
   
    <dt>
<code class="parameter">mode</code></dt>

    <dd>

     <p class="para">Auto-commit mode. The following constants can be used:</p>
     <p class="para">
     <ul class="simplelist">
       <li class="member"><strong><code>CUBRID_AUTOCOMMIT_FALSE</code></strong></li>
       <li class="member"><strong><code>CUBRID_AUTOCOMMIT_TRUE</code></strong></li>
     </ul>
     </p>
    </dd>

   
  </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.cubrid-set-autocommit-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
    <strong><code>TRUE</code></strong>, when process is successful.
  </p>
    <p class="para">
    <strong><code>FALSE</code></strong>, when process is unsuccessful.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.cubrid-set-autocommit-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
   <li class="member"><span class="function"><a href="cubrid_get_autocommit.html" class="function" rel="rdfs-seeAlso">cubrid_get_autocommit()</a> - Get auto-commit mode of the connection</span></li>
   <li class="member"><span class="function"><a href="cubrid_commit.html" class="function" rel="rdfs-seeAlso">cubrid_commit()</a> - Commit a transaction</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>